package com.fanrenqiji.entity;

import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import javax.persistence.*;

/**
 * Created by yanwt on 2017/2/4.
 * 重点数据操作日志表，记录数据状态，beforeOperationData 保存实体的json数据
 */
@Getter
@Setter
@Entity
@Table(name="tb_business_log")
@org.hibernate.annotations.Table(appliesTo = "tb_business_log",comment = "系统业务日志")
@org.hibernate.annotations.DynamicInsert
@org.hibernate.annotations.DynamicUpdate
@org.hibernate.annotations.Cache(region="business_log", usage = CacheConcurrencyStrategy.READ_WRITE)
public class BusinessLogEntity extends DataEntity{
    @Id
    @GeneratedValue(strategy= GenerationType.IDENTITY)
    private Long id;
    @Column(columnDefinition="varchar(100) not null comment '操作类型'")
    private String type;
    @Column(name = "before_operation_data",columnDefinition="text not null comment '操作前数据'")
    private String beforeOperationData;
    @Column(name = "after_operation_data",columnDefinition="text not null comment '操作后数据'")
    private String afterOperationData;
}
